import { PetItem } from "../PetItem";
import { SPetInfo } from "../../../../../Message/Game/SPetInfo";
import { PetUtil } from "../info/PetUtil";
import { Language } from "../../../../../extend/language/Language";
import { HTMLUtil } from "../../../../../com/gengine/utils/HTMLUtil";
import { PetColor } from "../info/PetColor";
//class PetExplorePetItem
    
    export  class PetExplorePetItem extends PetItem
    {
        constructor()
        {
            super();
            this._selectMask = new Object /* flash.display.Sprite */();
            this._selectMask.graphics.beginFill(16711680, 0.3);
            this._selectMask.graphics.drawCircle(20, 20, 22);
            this._selectMask.visible = false;
            this._selectMask.cacheAsBitmap = true;
            this.addChild(this._selectMask);
            this.buttonMode = true;
            this.useHandCursor = true;
            return;
        }

        public /* override */ get selected(): Boolean
        {
            return _selected;
        }

        public /* override */ set selected(arg1: Boolean)
        {
            _selected = arg1;
            this._selectMask.visible = arg1;
            return;
        }

        public /* override */ set petInfo(arg1: SPetInfo)
        {
            super.petInfo = arg1;
            if (arg1 == null) 
            {
                this.selected = false;
            }
            return;
        }

        public /* override */ get toolTipData()
        {
            var loc1=null;
            if (petInfo) 
            {
                loc1 = "<font size=\'16\'>" + PetUtil.getPetName(petInfo) + "</font>";
                loc1 = loc1 + ("\n" + PetUtil.getPetTypeName(petInfo));
                loc1 = loc1 + (Language.getString(54483) + HTMLUtil.addColor(petInfo.talent.toString(), PetColor.getTalentColor(petInfo).color));
                loc1 = loc1 + (Language.getString(54484) + HTMLUtil.addColor(petInfo.spirit.toString(), PetUtil.getSpiritTitleColor(petInfo.spirit)));
                loc1 = loc1 + (Language.getString(54485) + HTMLUtil.addColor(petInfo.growth.toString(), PetUtil.getGrowthTitleColor(petInfo.growth)));
                loc1 = "<textFormat leading=\'5\'>" + loc1 + "</textFormat>";
            }
            return loc1;
        }

        /* internal */ /* var */_selectMask: Object /* flash.display.Sprite */;
    }
